import scala.collection.mutable.ArrayBuffer

//定长数组
val a = new Array[Int](10)

val b = new Array[String](10)

val c = Array("Mike", "Jack", "Tom")

//变长数组

val d = new ArrayBuffer[Int]()
d += 1
d += 2
d += 3
d += 4
d += 5

d.toArray


//遍历数组
for (s <- c) println(s)

val m =
for (s <- c) yield (s)
for (z <- m) println("mmmmm"+z)

//使用foreach方法
c.foreach(println)




